package com.training.iyogo.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import com.training.iyogo.dao.IVIPDAO;
import com.training.iyogo.domain.VIP;
@Repository
@Transactional
public class VIPDAOImpl extends BaseDAOImpl<VIP> implements IVIPDAO {

	@Override
	public VIP findByName(String name) {
		List<VIP> list = find("from VIP v" + " where v.name =?0", name);
		if (list.size() > 0)
			return list.get(0);
		return null;
	};

}
